import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Created by S.Han on 2017-11-07.
 */
@EnableAutoConfiguration
@ComponentScan
@ServletComponentScan
@EnableTransactionManagement
@MapperScan(basePackages = "com.pangmaobao.iou.dao.mapper")
public class ServletInitializer extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        //此处在加载项目之前可以进行配置文件的读取
        return application.sources(ServletInitializer.class);
    }
}
